﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;

namespace Infrastructure
{
    public class MethodHelper
    {
        public static void ExecuteMethod<T>(T obj, string methodName)
        {
            Type type = FactoryCreator.Create(obj.GetType().Name).GetType();
            MethodInfo method = type.GetMethod(methodName);
            method.Invoke(Activator.CreateInstance(type), new object[] { obj });
        }
    }
}
